extends Node

signal card_aim_started(card_ui: CardUI)
signal card_aim_ended(card_ui: CardUI)
signal card_played(card: Card)

signal card_drag_started(card_ui: CardUI)
signal card_drag_ended(card_ui: CardUI)

signal player_hand_drawn
signal player_hand_discard
signal player_turn_ended
signal player_died
signal player_hurt

signal enemy_action_completed(enemy: Enemy)
signal enemy_turn_ended
signal enemy_died(enemy: Enemy)

signal battle_over_request(text: String, type: int)
signal battle_won
signal battle_reward_exited
signal tooltip_show_request(icon: Texture, text: String)
signal tooltip_hide_request(force: bool)
signal status_tooltip_request(statuses: Array[Status])

signal map_exited

signal shop_entered(shop: Shop)
signal shop_exited
signal shop_card_bought(card: Card, cost: int)
signal shop_relic_bought(relic: Relic, cost: int)

signal campfire_exited
signal treasure_room_exited(relic: Relic)

signal relic_tooltip_request(relic: Relic)

func do_battle_won() -> void:
	battle_won.emit()
	
func do_battle_reward_exited() -> void:
	battle_reward_exited.emit()
	
func do_map_exited() -> void:
	map_exited.emit()
	
func do_shop_exited() -> void:
	shop_exited.emit()
	
func do_shop_entered(shop: Shop) -> void:
	shop_entered.emit(shop)
	
func do_shop_card_bought(card: Card, cost: int) -> void:
	shop_card_bought.emit(card, cost)
	
func do_shop_relic_bought(relic: Relic, cost: int) -> void:
	shop_relic_bought.emit(relic, cost)	
	
func do_campfire_exited() -> void:
	campfire_exited.emit()

func do_treasure_room_exited(relic: Relic) -> void:
	treasure_room_exited.emit(relic)

func do_card_aim_started(card_ui: CardUI) -> void:
	card_aim_started.emit(card_ui)
	
func do_card_aim_ended(card_ui: CardUI) -> void:
	card_aim_ended.emit(card_ui)

func do_card_played(card: Card) -> void:
	card_played.emit(card)
	
func do_card_drag_started(card_ui: CardUI) -> void:
	card_drag_started.emit(card_ui)
	
func do_card_drag_ended(card_ui: CardUI) -> void:
	card_drag_ended.emit(card_ui)
	
func do_tooltip_show(icon: Texture, text: String) -> void:
	tooltip_show_request.emit(icon, text)
	
func do_tooltip_hide(force: bool = false) -> void:
	tooltip_hide_request.emit(force)
	
func do_player_hand_drawn() -> void:
	player_hand_drawn.emit()
	
func do_player_hand_discard() -> void:
	player_hand_discard.emit()
	
func do_player_turn_ended() -> void:
	player_turn_ended.emit()
	
func do_enemy_action_completed(enemy: Enemy) -> void:
	enemy_action_completed.emit(enemy)
	
func do_enemy_turn_ended() -> void:
	enemy_turn_ended.emit()
	
func do_enemy_died(enemy: Enemy) -> void:
	enemy_died.emit(enemy)
	
func do_player_died() -> void:
	player_died.emit()
	
func do_player_hurt() -> void:
	player_hurt.emit()

func do_battle_over_request(text: String, type: int) -> void:
	battle_over_request.emit(text, type)
	
func do_status_tooltip_request(statuses: Array[Status]) -> void:
	status_tooltip_request.emit(statuses)
	
func do_relic_tooltip_request(relic: Relic) -> void:
	relic_tooltip_request.emit(relic)
